import {createRouter, createWebHistory, RouterOptions} from "vue-router";
import {pcRoutes} from "@/router/pc";


const routes = [
    {
        path: '/',
        name: '/',
        meta: {
            title: '',
            isMenu: false
        },
        children: [
            ...pcRoutes,
        ],
        redirect: '/pc'
    },

]

const routerOptions = {
    history: createWebHistory('/cloud-disk'),
    routes: routes,
}


const router = createRouter(<RouterOptions>routerOptions)


// router.beforeResolve((_, from, next) => {
//     if (from.fullPath.includes('/pc/post/p')) {
//         document.title = 'Bi8Bo'
//     }
//     next()
// })
export default router